﻿using System;

using Xunit;

namespace Rarous.TexyNet.Test {
  public class Coverage {
    [Fact]
    public void Texy_AllowClasses_PropertyBehavior() {
      Texy target = new Texy();
      bool expected = true;
      target.AllowClasses = expected;

      Assert.Equal(expected, target.AllowClasses);
    }

    [Fact]
    public void Texy_AllowedClasses_CollectionBehavior() {
      Texy target = new Texy();

      Assert.Equal(0, target.AllowedClasses.Count);

      target.AllowedClasses.Add("bigger");

      Assert.Equal(1, target.AllowedClasses.Count);
    }

    [Fact]
    public void Texy_AllowedStyles_CollectionBehavior() {
      Texy target = new Texy();

      Assert.Equal(0, target.AllowedStyles.Count);

      target.AllowedStyles.Add("bigger");

      Assert.Equal(1, target.AllowedStyles.Count);
    }

    [Fact]
    public void Texy_AllowedTags_CollectionBehavior() {
      Texy target = new Texy();

      Assert.Equal(0, target.AllowedTags.Count);

      target.AllowedTags.Add(new Tag("strong"));

      Assert.Equal(1, target.AllowedTags.Count);
    }

    [Fact]
    public void Texy_AllowStyles_PropertyBehavior() {
      Texy target = new Texy();
      bool expected = true;
      target.AllowStyles = expected;

      Assert.Equal(expected, target.AllowStyles);
    }

    [Fact]
    public void Texy_AllowTags_PropertyBehavior() {
      Texy target = new Texy();
      bool expected = true;
      target.AllowTags = expected;

      Assert.Equal(expected, target.AllowTags);
    }

    [Fact]
    public void Texy_Text_PropertyBehaviort() {
      Texy target = new Texy();
      string expected = "text";
      target.Text = expected;

      Assert.Equal(expected, target.Text);
    }

    [Fact]
    public void Texy_SafeMode_PropertyBehavior() {
      Texy target = new Texy();
      bool expected = true;
      target.SafeMode = expected;

      Assert.Equal(expected, target.SafeMode);
    }

    [Fact]
    public void Texy_MergeLines_PropertyBehavior() {
      Texy target = new Texy();
      bool expected = true;
      target.MergeLines = expected;

      Assert.Equal(expected, target.MergeLines);
    }

    [Fact]
    public void Texy_ObfuscateEmail_PropertyBehavior() {
      Texy target = new Texy();
      bool expected = true;
      target.ObfuscateEmail = expected;

      Assert.Equal(expected, target.ObfuscateEmail);
    }

    [Fact]
    public void Texy_SingleLine_PropertyBehavior() {
      Texy target = new Texy();
      bool expected = true;
      target.SingleLine = expected;

      Assert.Equal(expected, target.SingleLine);
    }
  }
}
